The present invention relates to a logic circuit at least comprising registers including input and output registers and a computation circuit for computationally processing data.
Accordingly as the degree of integration of semiconductor integrated circuits is improved and the complexity of logical circuits is increased, a data transfer function to write data into a memory circuit therein or read it therefrom becomes indispensable. Such a function is especially significant for i) initialization of data, ii) reading computed results, iii) logical function test at the times of development of integrated circuits and forwarding and receiving of products, and iv) program development of integrated circuits.
In the logical function test, the first operation is to write initialization data into a register in the logic circuit to operate the logic circuit thereafter to read the content of the register. Accordingly, it is necessary to write data into a register in the logic circuit or read it therefrom.
An actual example of a conventional logic circuit is shown in FIG. 1. Registers 1, 2, 3 and 4 hold data to be computed. These registers 1, 2, 3 and 4 are controlled by control inputs 51, 52, 53 and 54, respectively. The registers 1 and 2 are connected to input terminals of an ALU (Arithmetic and Logic Unit) 11 serving as a computation circuit. Likewise, the registers 3 and 4 are connected to input terminals of an ALU 12. These ALUs 11 and 12 are controlled by control inputs 61 and 62, respectively. The result which has been computationally processed by the ALU 12 is shifted by a barrel shifter 14 controlled by a control input 64 and then is inputted to an ALU 13. The result which has been computationally processed by the ALU 11 is inputted to the ALU 13 as it is, which is controlled by a control input 63. The result which has been computationally processed by the ALU 13 is held by a register 5 controlled by a control input 55.
In addition, a selector 21 is provided for reading the contents of these registers 1 to 5. Namely, the selector 21 selects one of outputs from the registers 1 to 5 on the basis of a control input 71 to output a selected one to the external. Thus, the contents of the registers 1 to 5 can be read according to need.
However, the drawbacks with such a conventional logic circuit are that it is required to provide a selector for the purpose of reading the contents of registers, and that wiring a large number of signal lines with them being drawn around must be implemented for the purpose of connecting respective registers to the selector.
This results in an increase in the area of the semiconductor chip, an increase in delay time due to wiring, and an increase in operating power dissipation due to stray capacitance of the wiring. Another drawback with this conventional logic circuit is that it is unable to directly write a desired data into the register, with the result that a further additional circuit is required in order to write data thereinto.